package mode.factory.cxgc;

/**
 * 抽象工厂模式测试
 *
 * @author xjx
 * @date 2023/7/18 11:20
 */
public class MainTest {

    public static void main(String[] args) {
        System.out.println("================华为生产====================");
        HuaWeiFactory huaWeiFactory = new HuaWeiFactory();
        IPhoneProduct product = huaWeiFactory.iPhoneProduct();
        product.start();
        product.callUp();
        product.sendSMS();

        IRouterProduct routerProduct = huaWeiFactory.iRouterProduct();
        routerProduct.findWifi();
        routerProduct.Setting();
        routerProduct.shutdown();

        System.out.println("================Apple生产====================");
        AppleFactory appleFactory = new AppleFactory();
        IPhoneProduct iPhoneProduct = appleFactory.iPhoneProduct();
        iPhoneProduct.start();
        iPhoneProduct.callUp();
        iPhoneProduct.sendSMS();

        IRouterProduct iRouterProduct = appleFactory.iRouterProduct();
        iRouterProduct.findWifi();
        iRouterProduct.Setting();
        iRouterProduct.shutdown();
    }
}
